com.supermap.ai

Class AIDetectView

  • java.lang.Object
    • android.view.View
      • android.view.ViewGroup
        • android.widget.RelativeLayout
          • com.supermap.ai.AIDetectView
  • All Implemented Interfaces:
    android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback, android.view.ViewManager, android.view.ViewParent


    public class AIDetectView
    extends android.widget.RelativeLayout
    AI recognition class control
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static interface  AIDetectView.DetectListener
      AI recognition listener which is for listening result of analyzing pictures.
      • Nested classes/interfaces inherited from class android.widget.RelativeLayout

        android.widget.RelativeLayout.LayoutParams
      • Nested classes/interfaces inherited from class android.view.ViewGroup

        android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
      • Nested classes/interfaces inherited from class android.view.View

        android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
    • Field Summary

      • Fields inherited from class android.widget.RelativeLayout

        ABOVE, ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_END, ALIGN_LEFT, ALIGN_PARENT_BOTTOM, ALIGN_PARENT_END, ALIGN_PARENT_LEFT, ALIGN_PARENT_RIGHT, ALIGN_PARENT_START, ALIGN_PARENT_TOP, ALIGN_RIGHT, ALIGN_START, ALIGN_TOP, BELOW, CENTER_HORIZONTAL, CENTER_IN_PARENT, CENTER_VERTICAL, END_OF, LEFT_OF, RIGHT_OF, START_OF, TRUE
      • Fields inherited from class android.view.ViewGroup

        FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
      • Fields inherited from class android.view.View

        ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, VISIBLE, X, Y
    • Constructor Summary

      Constructors 
      Constructor and Description
      AIDetectView(android.content.Context context)
      Construction method
      AIDetectView(android.content.Context context, android.util.AttributeSet attrs)
      Construction method
      AIDetectView(android.content.Context context, android.util.AttributeSet attrs, int defStyle)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void changeModelFile(AIDetectViewInfo info)
      Switch models
      void clearDetectObjects()
      Clears recognition objects
      void dispose()
      Stops recognizing.
      java.util.Vector<java.lang.String> getAllDetectArrayProvide()
      Gets all available recognition classification arrays
      java.util.Vector<java.lang.String> getDetectArrayToUse()
      Gets the recognition classification array
      int getDetectInterval()
      Gets the recognized time interval
      android.hardware.Camera.Size getPolySize()
      Gets the width and height of each grid under the aggregation mode
      android.graphics.Bitmap getPreviewBitmap()
      Gets the previewed picture
      android.graphics.Bitmap getScreenCapture()
      AI capturing interface to save the current preview picture and recognition frame
      int getTrackedCount()
      Gets the counting result
      void init()
      Initializing.
      boolean isDetect()
      The status of the recognition mode
      boolean isPolymerize()
      Returns the aggregation mode.
      boolean isPolyWithRect()
      Returns whether to draw the detection frame under the aggregation mode
      void pauseDetect()
      Pauses
      void resetTrackedCount()
      Set the tracing result to 0
      void resumeDetect()
      Recognizing.
      void setAIDetectStyle(AIDetectStyle aiDetectStyle)
      Sets AI drawing style
      void setDetectArrayToUse(java.util.Vector<java.lang.String> detectArray)
      Sets the selection classification array
      void setDetectedListener(AIDetectView.DetectListener listener)
      Registers AI recognition listener
      void setDetectInfo(AIDetectViewInfo info)
      Before starting, you need to set related parameters.
      void setDetectInterval(int interval)
      Sets the recognized time interval
      void setGpsData(Point2D gpsData)
      Sets GPS coordinates.
      void setPolyColorAlpha(int alpha)
      Sets the transparency of colors in the aggregation mode which ranges from 0 to 255. 0 means transparent. 255 denotes opacity.
      boolean setPolyColorArray(java.util.Vector<java.lang.Integer> colorArray)
      Sets the ribbon of aggregation mode
      void setPolymerize(boolean value)
      Sets the aggregation mode.
      void setPolymerizeThreshold(int x, int y)
      Sets the threshold value of aggregation mode
      void setPolySize(android.hardware.Camera.Size size)
      Sets the width and height of each grid under the aggregation mode
      void setPolyWithRect(boolean value)
      Sets whether to draw the detection frame under the aggregation mode
      void startCameraPreview()
      Turns on camera preview
      void startCountTrackedObjs()
      Begins to trace and count
      void startPushAIStream(java.lang.String ip, java.lang.String port, java.lang.String id, int framerate, int width, int height, InitCallback callback)
      Begins to post video flow with AI detection result
      void startPushCustomStream(java.lang.String ip, java.lang.String port, java.lang.String id, android.graphics.Bitmap bitmap, int width, int height, InitCallback callback)
      Begins to post custom content video flow
      void stopCameraPreview()
      Turns off camera preview
      void stopCountTrackedObjs()
      Stops to trace and count
      void stopPushAIStream()
      Stops to push flow
      • Methods inherited from class android.widget.RelativeLayout

        dispatchPopulateAccessibilityEvent, generateLayoutParams, getBaseline, getGravity, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, requestLayout, setGravity, setHorizontalGravity, setIgnoreGravity, setVerticalGravity, shouldDelayChildPressedState
      • Methods inherited from class android.view.ViewGroup

        addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchSetActivated, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getOverlay, getPersistentDrawingCache, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isMotionEventSplittingEnabled, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onInterceptHoverEvent, onInterceptTouchEvent, onRequestSendAccessibilityEvent, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, showContextMenuForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
      • Methods inherited from class android.view.View

        addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeScroll, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, draw, findViewById, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBottom, getCameraDistance, getClipBounds, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setClipBounds, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface android.view.ViewParent

        canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows
    • Constructor Detail

      • AIDetectView

        public AIDetectView(android.content.Context context)
        Construction method
        Parameters:
        context - The context.
      • AIDetectView

        public AIDetectView(android.content.Context context,
                            android.util.AttributeSet attrs)
        Construction method
        Parameters:
        context - The context.
        attrs - Defines the attrs.xml of the control properties.
      • AIDetectView

        public AIDetectView(android.content.Context context,
                            android.util.AttributeSet attrs,
                            int defStyle)
        Constructor
        Parameters:
        context - The context.
        attrs - Defines the attrs.xml of the control properties.
        defStyle - Control
    • Method Detail

      • setDetectInfo

        public void setDetectInfo(AIDetectViewInfo info)
        Before starting, you need to set related parameters.
        Parameters:
        info - Initializes parameters
      • init

        public void init()
        Initializing. The interface is required to finish the AI initialization
      • setDetectInterval

        public void setDetectInterval(int interval)
        Sets the recognized time interval
        Parameters:
        interval - time interval in ms
      • getDetectInterval

        public int getDetectInterval()
        Gets the recognized time interval
        Returns:
        time interval in ms
      • setDetectedListener

        public void setDetectedListener(AIDetectView.DetectListener listener)
        Registers AI recognition listener
        Parameters:
        listener - listener.
      • setDetectArrayToUse

        public void setDetectArrayToUse(java.util.Vector<java.lang.String> detectArray)
        Sets the selection classification array
        Parameters:
        detectArray - classification array model
      • setGpsData

        public void setGpsData(Point2D gpsData)
        Sets GPS coordinates.
        Parameters:
        gpsData - Positioning coordinates.
      • getDetectArrayToUse

        public java.util.Vector<java.lang.String> getDetectArrayToUse()
        Gets the recognition classification array
        Returns:
        Returns the recognition classification array
      • resumeDetect

        public void resumeDetect()
        Recognizing.
      • pauseDetect

        public void pauseDetect()
        Pauses
      • dispose

        public void dispose()
        Stops recognizing. Turn off camera and recall resource.
      • clearDetectObjects

        public void clearDetectObjects()
        Clears recognition objects
      • setPolymerize

        public void setPolymerize(boolean value)
        Sets the aggregation mode.
        Parameters:
        value - boolean values of aggregation mode
      • isPolymerize

        public boolean isPolymerize()
        Returns the aggregation mode.
        Returns:
        boolean values of aggregation mode
      • setPolymerizeThreshold

        public void setPolymerizeThreshold(int x,
                                           int y)
        Sets the threshold value of aggregation mode
        Parameters:
        x - the threshold value of horizontal coordinate of grid aggregation
        y - the threshold value of vertical coordinate of grid aggregation
      • getPolySize

        public android.hardware.Camera.Size getPolySize()
        Gets the width and height of each grid under the aggregation mode
        Returns:
        the width and height of each grid under the aggregation mode
      • setPolySize

        public void setPolySize(android.hardware.Camera.Size size)
        Sets the width and height of each grid under the aggregation mode
        Parameters:
        size - the width and height of each grid under the aggregation mode
      • isDetect

        public boolean isDetect()
        The status of the recognition mode
        Returns:
        whether to set to recognition mode
      • getPreviewBitmap

        public android.graphics.Bitmap getPreviewBitmap()
        Gets the previewed picture
        Returns:
        Preview pictures
      • getTrackedCount

        public int getTrackedCount()
        Gets the counting result
        Returns:
        the counting result
      • resetTrackedCount

        public void resetTrackedCount()
        Set the tracing result to 0
      • startCountTrackedObjs

        public void startCountTrackedObjs()
        Begins to trace and count
      • stopCountTrackedObjs

        public void stopCountTrackedObjs()
        Stops to trace and count
      • getAllDetectArrayProvide

        public java.util.Vector<java.lang.String> getAllDetectArrayProvide()
        Gets all available recognition classification arrays
        Returns:
        the recognition classification array
      • getScreenCapture

        public android.graphics.Bitmap getScreenCapture()
        AI capturing interface to save the current preview picture and recognition frame
        Returns:
        The current review pictures
      • setAIDetectStyle

        public void setAIDetectStyle(AIDetectStyle aiDetectStyle)
        Sets AI drawing style
        Parameters:
        aiDetectStyle - AI drawing style parameters
      • startCameraPreview

        public void startCameraPreview()
        Turns on camera preview
      • stopCameraPreview

        public void stopCameraPreview()
        Turns off camera preview
      • startPushAIStream

        public void startPushAIStream(java.lang.String ip,
                                      java.lang.String port,
                                      java.lang.String id,
                                      int framerate,
                                      int width,
                                      int height,
                                      InitCallback callback)
        Begins to post video flow with AI detection result
        Parameters:
        ip - ip address of rtsp server
        port - the port of rtsp server.
        id - id name of push flow
        framerate - the frame rate of plug flow
        width - resolution width of plug flow
        height - resolution height of plug flow
        callback - callback listener of push flow status
      • startPushCustomStream

        public void startPushCustomStream(java.lang.String ip,
                                          java.lang.String port,
                                          java.lang.String id,
                                          android.graphics.Bitmap bitmap,
                                          int width,
                                          int height,
                                          InitCallback callback)
        Begins to post custom content video flow
        Parameters:
        ip - ip address of rtsp server
        port - the port of rtsp server.
        id - id name of plug flow
        bitmap - plug flow image
        width - resolution width of plug flow
        height - resolution height of plug flow
        callback - callback listener of push flow status
      • stopPushAIStream

        public void stopPushAIStream()
        Stops to push flow
      • changeModelFile

        public void changeModelFile(AIDetectViewInfo info)
        Switch models
        Parameters:
        info - Attributes of models
      • setPolyWithRect

        public void setPolyWithRect(boolean value)
        Sets whether to draw the detection frame under the aggregation mode
        Parameters:
        value - boolean value on whether to draw the detection frame
      • isPolyWithRect

        public boolean isPolyWithRect()
        Returns whether to draw the detection frame under the aggregation mode
        Returns:
        boolean value on whether to draw the detection frame
      • setPolyColorArray

        public boolean setPolyColorArray(java.util.Vector<java.lang.Integer> colorArray)
        Sets the ribbon of aggregation mode
        Parameters:
        colorArray - 4 colors are required. The number of targets corresponding with each color are 1-3, 4-6, 7-9, and equal to or more than 10.
        Returns:
        Whether the settings are successful
      • setPolyColorAlpha

        public void setPolyColorAlpha(int alpha)
        Sets the transparency of colors in the aggregation mode which ranges from 0 to 255. 0 means transparent. 255 denotes opacity.
        Parameters:
        alpha - Transparency of color.